-- GENERATED SPELL FOR [Geomancer Flintdagger] --


function spell0_2609(pUnit, Event) --@Fire Nova Totem,Self--
if charge_disp ~= 'na' then
pUnit:FullCastSpellOnTarget(8499,pUnit)
local charge_disp = 'na'
end
pUnit:RegisterEvent('Sorts_2609', 1, 1)
end

function spell1_2609(pUnit, Event) --@Fire Shield III,n/a--
pUnit:FullCastSpellOnTarget(2601,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2609', 31000, 1)
end

function spell2_2609(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(20823,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_2609', 3000, 1)
end

function Sorts_2609(pUnit, Event)
local choix_sorts_2609 = math.random(0, 2)
if choix_sorts_2609 == 0 then
pUnit:RegisterEvent('spell0_2609', 1, 1)
end
if choix_sorts_2609 == 1 then
pUnit:RegisterEvent('spell1_2609', 1, 1)
end
if choix_sorts_2609 == 2 then
pUnit:RegisterEvent('spell2_2609', 1, 1)
end
end

function mob2609_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_2609', math.random(1500, 3000), 1)
end

function mob2609_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2609_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob2609_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(2609, 1, 'mob2609_Action')
RegisterUnitEvent(2609, 2, 'mob2609_Leave')
RegisterUnitEvent(2609, 3, 'mob2609_Kill')
RegisterUnitEvent(2609, 4, 'mob2609_Die')
